#include "dictionary.h"

/*
 * Constructors & destructors
 */

Dictionary::Dictionary() : Book(), words() {}

Dictionary::Dictionary(const Dictionary &other) : Book(other), words(other.words) {}

Dictionary::Dictionary(const Book &other) : Book(other), words() {}

Dictionary::~Dictionary() {}

/*
 * Setters & getters
 */

std::string Dictionary::getWordDescription(const std::string &word_name) {
    return this->words[word_name];
}

std::string Dictionary::getWordDescription(const char *word_name) {
    return this->words[word_name];
}

void Dictionary::setWord(const char *word_name, const char *word_desc) {
    this->words.insert({ word_name, word_desc });
}

void Dictionary::setWord(const std::string &word_name, const std::string &word_desc) {
    this->words.insert({ word_name, word_desc });
}

void Dictionary::setWord(const std::pair<std::string, std::string> &word) {
    this->words.insert(word);
}
